(module output mzscheme
  (provide srl-output%)
  
  (require (lib "mred.ss" "mred")
           (lib "class.ss")
           "gui.ss")
  
  (define srl-output%
    (class vertical-pane%
      (init parent)
      (super-new (parent parent))
      
      (define/public (chooser) chooser-l)
      (define/public (mpw) mpw-message)
      
      (define (chooser-list-display) (list ""))
      (define-handler chooser-list-display)
      
      (define-handled-fn on-add-entry)
      (define-handled-fn on-edit-entry)
      (define-handled-fn on-remove-entry)
      (define-handled-fn on-choose)
      
      (define-row buttons-row parent)
      (define-label "" buttons-row)
      (instantiate button%
        ("Add Entry" buttons-row (lambda (button event) (on-add-entry))))
      
      (instantiate button%
        ("Edit Entry" buttons-row
                      (lambda (button event) (on-edit-entry))))
      
      (instantiate button%
        ("Remove Entry" buttons-row
                        (lambda (button event) (on-remove-entry))))
      
      (define-row output-row parent)
      (define-label "Choose a run to display:" output-row)
      (define chooser-l
        (instantiate list-box% (""
                                (chooser-list-display)
                                output-row
                                (lambda (box event) (on-choose))
                                '(multiple) #f +font+ +font+ #t 2 2 500 100)))
      
      (define-row mpw-row parent)
      (define-label "Miles per Week:" mpw-row)
      (define mpw-message (define-label "" mpw-row)))))